package nyu.edu.database.data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import nyu.edu.database.data.locks.Lock;

public class Site {
	private final int siteId;
	private boolean isAvailable;
	private ArrayList<DataItem> presentDataItems;
	private Map<DataItem, Lock> lockManager;

	public Site(int siteId) {
		super();
		this.siteId = siteId;
		isAvailable = true;
		presentDataItems = new ArrayList<DataItem>();
		lockManager = new HashMap<DataItem, Lock>();
	}

	public void addDataItem(DataItem item) {
		presentDataItems.add(item);
		lockManager.put(item, new Lock());
	}
}
